package com.huawei.appmarket.service.appzone.view.widget;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import com.huawei.appgallery.foundation.ui.framework.cardkit.widget.CardListAdapter;
import com.huawei.appmarket.service.store.awk.node.AppZoneTraceEditNode;
import o.cht;
import o.cia;
import o.cib;
import o.cie;
import o.Logger;

public class TraceEditAppListAdapter extends CardListAdapter {
    public TraceEditAppListAdapter(Context context, cia o_cia) {
        super(context, o_cia);
    }

    public View createItemView(int i, View view, ViewGroup viewGroup) {
        cie appZoneTraceEditNode;
        Exception e;
        int ˎ = this.provider.ˎ(i);
        if (ˎ == cib.ˏ("appzonetraceinfocard")) {
            appZoneTraceEditNode = new AppZoneTraceEditNode(this.context);
            appZoneTraceEditNode.ˎ = ˎ;
        } else {
            Class ˊ = cib.ˊ(ˎ);
            if (ˊ == null) {
                Logger.e("NodeFactory", "Don't support card type:" + ˎ);
                return null;
            }
            try {
                appZoneTraceEditNode = (cht) ˊ.getConstructor(new Class[]{Context.class}).newInstance(new Object[]{this.context});
                try {
                    appZoneTraceEditNode.ˎ = ˎ;
                } catch (Exception e2) {
                    e = e2;
                    Logger.e("NodeFactory", "createNode error, card type:" + ˎ + " , " + e.toString());
                    return createView(appZoneTraceEditNode, viewGroup);
                }
            } catch (Exception e3) {
                Exception exception = e3;
                appZoneTraceEditNode = null;
                e = exception;
                Logger.e("NodeFactory", "createNode error, card type:" + ˎ + " , " + e.toString());
                return createView(appZoneTraceEditNode, viewGroup);
            }
        }
        return createView(appZoneTraceEditNode, viewGroup);
    }
}
